//
//  ViewController.m
//  SpringAnimation
//
//  Created by mac on 16/3/14.
//  Copyright © 2016年 Pioneer. All rights reserved.
//

#import "ViewController.h"
#import "PioneerSpringAnimation.h"
@interface ViewController ()
@property (nonatomic, strong) PioneerSpringAnimation *pioneer;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self pioneer];
}

- (PioneerSpringAnimation *)pioneer
{
    if(!_pioneer)
    {
        _pioneer = [[PioneerSpringAnimation alloc]initWithType:PioneerTypeTop andOriginHeight:0 andControlView:self.view];
    }
    return _pioneer;
}
- (IBAction)btnClick:(UIButton *)sender {
    switch (sender.tag) {
        case 11:
        {
//            上
            [_pioneer setType:PioneerTypeTop];
        }
            break;
        case 12:
        {
//            左
            [_pioneer setType:PioneerTypeLeft];
        }
            break;
        case 13:
        {
//            下
            [_pioneer setType:PioneerTypeBottom];
        }
            break;
        case 14:
        {
//            右
            [_pioneer setType:PioneerTypeRight];
        }
            break;
        default:
            break;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
